import request from '@/utils/request'

// 获取所有部门负责人
export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

export function getEmployees(params) {
  return request({
    url: '/sys/user',
    method: 'get',
    params
  })
}

export function addEmployees(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}

export function delEmployees(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}

export function improtEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}

export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}

export function getJobDetail(id) {
  return request({
    url: `/emloyees/${id}/jobs`,
    method: 'get'
  })
}
